package com.ziytek.web.citizen.mapper;

import com.ziytek.web.citizen.model.bean.BasicMap;
import com.ziytek.web.citizen.pojo.BasicDataTable;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author fenghx
 * @version 1.0
 * @className BasicDataBatchMapper
 * Description:
 * @date 2024/3/25 16:08
 */
@Mapper
public interface BasicDataBatchMapper extends EasyBaseMapper<BasicDataTable> {

    /**
     * Description: 表是否存在
     *
     * @param tableName 表名
     * @return Integer 1存在 0不存在
     */
    Integer existTable(String tableName);

    /**
     * Description: 创建表
     */
    void createTable();

    /**
     * Description: 创建表索引
     */
    void createTableIndex();

    /**
     * Description: 创建表索引
     */
    void createTableIndexOne();

    /**
     * Description: 新增
     *
     * @param basic basic
     */
    void insertData(BasicDataTable basic);

    /**
     * Description: 查询基础列表数据总数
     *
     * @param cabinetNo       cabinetNo
     * @param dataType        dataType
     * @param beginStart      beginStart
     * @param createTimeStart createTimeStart
     * @param createTimeEnd   createTimeEnd
     * @return long
     */
    Integer queryListCountByCabinetNo(String cabinetNo, String dataType, Long beginStart, Long createTimeStart, Long createTimeEnd);

    /**
     * Description: 查询基础列表数据
     *
     * @param cabinetNo       cabinetNo
     * @param dataType        dataType
     * @param beginStart      beginStart
     * @param createTimeStart createTimeStart
     * @param createTimeEnd   createTimeEnd
     * @param start           start
     * @param limit           limit
     * @return List<BasicDataTable>
     */
    List<BasicMap> queryListByCabinetNo(String cabinetNo, String dataType, Long beginStart, Long createTimeStart, Long createTimeEnd, int start, int limit);
}
